<template>
  	<div class="custom-commonBox" style="min-width:950px;">
		<div class="commonTitleBox" style="margin-bottom:0;">
			<div class="commonHeaderTitle">告警消息</div>
		</div>
		<el-tabs v-model="activeName">
			<el-tab-pane label="告警消息" name="warningMessage"></el-tab-pane>
			<el-tab-pane label="异常设备" name="abnormalDevice"></el-tab-pane>
		</el-tabs>
		<warning-message v-if="activeName=='warningMessage'" />
		<abnormal-device ref="abnormalDevice" :type="type" v-if="activeName=='abnormalDevice'" />
   </div>
</template>
<script>
/* eslint-disable */
export default {
	name:'warningInfo',
	components: {
		warningMessage: () => import('@/pages/warningInfo/components/warningMessage.vue'),
		abnormalDevice: () => import('@/pages/warningInfo/components/abnormalDevice')
		
	},
	data() {
		return{
			activeName:this.$route.params.activeName||'warningMessage',
			sendData:{},
      type:this.$route.params.type||''
		}
	},
	created(){
    this.activeName = this.$route.params.activeName||'warningMessage'
	},
	watch:{
		'$route'(){
			if(this.$route.name=='warningInfo'&&this.$route.params.activeName){
				this.activeName = this.$route.params.activeName||'warningMessage'
			}
		}
	}
};
</script>
